
 public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = 1;
        int count = 0;
        System.out.print(n+ " ");
        while (n<500)
        {
            while (count < 49)
            {
                n++;
                int isPrime = 1;
                for (int i = 2; i<n; i++)
                {
                    if ( n % i == 0)
                    {
                        isPrime = 0;
                        break;
                    }
                }
                if ( isPrime == 1)
                {
                    count = count + 1;
                    System.out.print(n+ " ");            
                }
            }break;
        }
    }

}